home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dbase / sdf2dbf.zip / SDF2DBF.DOC < prev   
Text File  |  1987-11-15  |  4KB  |  98 lines

  1.  
  2.        SDF2DBF - Convert System Data Format to Data-Base File
  3.  
  4.  
  5. INTRODUCTION
  6.  
  7. dBASE allows you to append data to an existing data-base from an
  8. ASCII file with a corresponding format.  This format, SDF or System
  9. Data Format, has data in columns the same width as the dBASE field
  10. widths, one record per line.
  11.  
  12. The major shortcoming of this is that the data-base must exist
  13. before you try to append data to it.  SDF2DBF allows you to
  14. annotate an SDF file with field names and convert it directly to a
  15. dBASE data-base (DBF file).  It has been tested with dBASE III Plus
  16. and may work with dBASE III.  dBASE II format is not supported.
  17.  
  18.  
  19. USAGE
  20.  
  21. The syntax for SDF2DBF is as follows:
  22.  
  23.     SDF2DBF [file [P][D][Q]]
  24.  
  25. To run SDF2DBF interactively, type SDF2DBF at the PC/MS-DOS prompt;
  26. you will be prompted for the name of the file to convert and told
  27. how may records and fields were processed.  Purge, Date and Quiet
  28. options are not available with interactive use.
  29.  
  30. Two runstring options, Q and P, are provided to aid in the use of
  31. SDF2DBF within batch files.  The Q(uiet) option suppresses all
  32. screen output.  The P(urge) option allows SDF2DBF to overwrite an
  33. existing data-base if it exists.  In addition, SDF2DBF will return
  34. any non-normal status in the DOS return code accessed by
  35. Errorlevel.  Possible values are:
  36.  
  37.     1 - SDF2DBF could not find the specified SDF file
  38.     2 - The DBF file already exists and Purge was not specified.
  39.  
  40. The last option, D(ate), causes SDF2DBF to analyze numeric fields
  41. of length 8 to see if they are valid dates.  Note that this means
  42. December 1, 1 A.D. would be in the SDF file as 00011201; the
  43. leading zeros are necessary to make the field 8 characters long.
  44.  
  45.  
  46. EXAMPLE
  47.  
  48. Examples seem to be the best documentation.  With that in mind,
  49. consider the annotated SDF file:
  50.  
  51. LNAME          FNAME     SHOESIZE PHONE        BDAY    TITLE
  52. Smith          Bob       9        (111)555-123419521022Big Chief
  53. Jones          Davey     10       (222)555-234519411207Sailor
  54. Brown          Buster    7        (333)555-345620100101Salesman
  55.  
  56. When SDF2DBF processes this file with the D option, it creates a
  57. data-base of three records of five fields each.  The structure of
  58. the data-base is as follows:
  59.  
  60.  
  61.     Name      Type      Width
  62.     LNAME     Character 15
  63.     FNAME     Character 10
  64.     SHOESIZE  Numeric    9
  65.     PHONE     Character 13
  66.     BDAY      Date       8
  67.     TITLE     Character  9
  68.  
  69. The name and width of each field is determined from the first
  70. record of the annotated SDF file (this is the record which would
  71. NOT be in a standard dBASE SDF file).  The width of all but the
  72. last field is taken from the spacing of the names.  The width of
  73. the last field is set to the maximum length of any datum for that
  74. field (e.g. LENGTH('Big Chief')) or the length of the name,
  75. whichever is longer.  Note that it is not possible to have a field
  76. whose width is less than the length of its name and that D(ate)
  77. fields must have names less than 8 characters long.
  78.  
  79. The type for each field is determined from the type of data found
  80. in the corresponding column of the SDF file.  By default, SDF2DBF
  81. only creates Numeric and Character type fields.  A Numeric consists
  82. only of digits (0..9), negative signs, and decimals.  Any thing
  83. else is considered a Character.  No checking is done for multiple
  84. decimals or a non-leading negative sign.  To allow 19521022 to be
  85. interpreted as October 22, 1952 instead of 19,521,022.00, specify
  86. the D(ate) option on the runstring.
  87.  
  88.  
  89. COPYRIGHT NOTICE
  90.  
  91. SDF2DBF is a shareware program.  You may copy and distribute it
  92. freely.  If you find you like it and use it, please send what you
  93. think it is worth ($15 suggested) to:
  94.  
  95.     Christopher Nelson
  96.     160 Ontario Street
  97.     Buffalo, NY  14207
  98.